package com.jml.参数调优;

import java.util.ArrayList;
import java.util.List;


// -Xms1m -Xmx10m -XX:+PrintGCDetails -XX:+HeapDumpOnOutOfMemoryError
public class 内存溢出 {

    public static void main(String[] args) {
        List<Object> listObject = new ArrayList<>();
        for (int i = 0; i < 100; i++) {
            System.out.println("i:" + i);
            Byte[] bytes = new Byte[1 * 1024 * 1024];
            listObject.add(bytes);
        }
        System.out.println("添加成功...");
    }

}
